package com.hmdp.service;

public interface ILock {

    /**
     * 尝试获取锁
     * @param timeoutSec 锁持有的超过时间，过期后自动释放
     * @return true代表获取锁成功，false代表失败
     **/
    public boolean tryLock(Long timeoutSec);
    /**
     * 释放锁
     **/
    public void unlock();
}
